from common.connect_db import MyDB

my_db = MyDB()


class DataBaseOffOrder:

    @staticmethod
    def filter_life_offline_shop_shops_by_member_id(member_id):
        """
        通过member_id获得线下店铺详细信息
        :param member_id:
        :return:
        """
        sql = "select * from life_offline_shop_shops where member_id= '%s'" % member_id
        result = my_db.execute_select('offshop', sql)
        if len(result) == 1:
            return result[0]
        else:
            raise ValueError('查询不到线下商家信息！')
